<?php 
/*
 module:		角色管理控制器
 create_time:	2021-07-27 18:11:24
 author:		
 contact:		
*/

namespace app\api\validate;
use think\validate;

class User extends validate {

	protected $rule = [
		'id'=>['require'],
		'name'=>['require'],
		'identity_type'=>['require'],
		'identity_no'=>['require'],
		'mobile'=>['require','mobile'],
	];

	protected $message = [
		'id.require'=>'ID不能为空',
		'name.require'=>'出行人不能为空',
		'identity_type.require'=>'证件类型不能为空',
		'identity_no.require'=>'证件号码不能为空',
		'mobile.require'=>'手机不能为空',
		'mobile.mobile'=>'手机格式错误',

	];

	protected $scene  = [
		'passengerList' => [],
		'addPassenger'=>['name', 'identity_type', 'identity_no', 'mobile'],
		'editPassenger' => ['id', 'name', 'identity_type', 'identity_no', 'mobile'],
	];
}

